export function deepCopy(obj) {
    if (!obj) return {};
    let result = void 0;
    if (typeof obj === "object") {
        result = obj.constructor === Array ? [] : {};
        for (let i in obj) {
            typeof obj[i] === "object"
                ? (result[i] = deepCopy(obj[i]))
                : obj.hasOwnProperty(i)
                ? (result[i] = obj[i])
                : void 0;
        }
    } else {
        result = obj;
    }
    return result;
}